package day12.demo2;

/**
 * @Auther:小陈的Java
 */
public class ThreadDemo2 extends Thread{
    @Override
    public void run() {
        try {
            System.out.println("子线程");
            Thread.sleep(1000);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
    }

    public static void main(String[] args) throws Exception{
        ThreadDemo2 threadDemo2 = new ThreadDemo2();
        threadDemo2.start();
        Thread.sleep(500);
        System.out.println(threadDemo2.getState());
    }
}
